package org.samcolon.nettydemo.nettydemo.controller;

import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description: 测试接口
 * @author: Sam.zhang
 * @date: 2021/12/26 - 15:58
 */
@Controller
@RequestMapping("test")
public class TestController {

    @GetMapping("/hello-word")
    @ResponseBody
    public ResponseEntity<String> helloWord(){
        return ResponseEntity.ok("hello word");
    }
    @GetMapping("/hello-word-html")
    public String helloWordHtml(){
        return "HelloWord";
    }
}
